JavaScript Program to Print Prime Numbers Between 1 to N